
<div class="panel panel-success">
      <div class="panel-heading">
            <h3 class="panel-title">代办事项</h3>
      </div>
      <div class="panel-body">
          <label>
                <input type="text" class="form-control" placeholder="添加代办事项" [(ngModel)]="event2" (keyup)="add2($event)"/>
          </label>
          <label>
                <input type="button" class="btn btn-success" value="添加" (click)="add()" />
          </label>
      </div>

      
        <a href="#" class="list-group-item active">
            代办事项
        </a>
        <span *ngFor="let item of event;let key=index;" >
            <a href="#" class="list-group-item"  *ngIf="item.checked!=true" >        <!-- 内容变化了触发 -->
                <input type="checkbox" [id]="'check'+key" [(ngModel)]="item.checked" (change)="checkboxchange()"  />
                <label [for]="'check'+key" >{{item.name}}</label>
                <input type="button" value="删除" (click)="delete(key)" class="btn btn-info" />
            </a>
        </span>
       

        <a href="#" class="list-group-item active">
                已完成事项
            </a>
            <span *ngFor="let item of event;let key=index;" >
                <a href="#" class="list-group-item" *ngIf="item.checked==true">
                    <input type="checkbox" [id]="'check'+key" [(ngModel)]="item.checked" (change)="checkboxchange()"  />
                    <label [for]="'check'+key" >{{item.name}}</label>
                    <input type="button" value="删除" (click)="delete(key)" class="btn btn-info" />
                </a>
            </span>
      
</div>



